package dao;

import text.leaveBean;
import utils.JDBCUtil;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

public class leaveDao {

    public void setleaveMessage() {
        Connection conn = null;
        PreparedStatement ps = null;

        try {
            conn = JDBCUtil.getConnection();
            String sql = "insert into leaveMessage values (?)";
            ps = conn.prepareStatement(sql);
            ps.setString(1, new leaveBean().getLeave());
            ps.execute();
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            JDBCUtil.close(ps, conn);
        }
    }
}
